<script setup lang="ts" name="Profile">
import API from "@/api";
import userinfo from "@/store/userinfo";

const { t } = useI18n();
const router = useRouter();
const piniaUserinfo: any = userinfo();
const global: any = getCurrentInstance()?.appContext.config.globalProperties;
const images = reactive({
  wallet: new URL("@/assets/images/Me/wallet.png", import.meta.url).href,
});


const data: any = reactive({
  channelList: [],
  currentChannelId: null,
  activeType: 0,
  withdrawForm: {
    phone: "",
    account: "",
    accountName: "",
    IFSC: "",
    CPF: "",
  },
});

const { channelList, currentChannelId, widthTyps, activeType, withdrawForm } =
  toRefs(data);

const currentchannelItem = computed(() => {
  return channelList.value.find((it: any) => it?.id == currentChannelId.value);
});

const onSubmit = (values: any) => {
};
</script>

<template>
  <div class="profileWrap">
    <DetailHeader :title="t('my.test10')" :isNeedBackIcon="true" />
    <div class="profileForm">
      <van-form @submit="onSubmit" label-align="top" :v-model="withdrawForm">
        <van-cell-group>
          <van-field
            v-model="withdrawForm.phone"
            required
            type="text"
            style="line-height: 40px"
            class="myTextArea"
            name="phone"
            label="手机号"
            :rules="[{ required: true, message: t('withdraw.test6') }]"
          />
          <van-field
            v-model="withdrawForm.account"
            required
            type="text"
            style="line-height: 40px"
            class="myTextArea"
            name="account"
            label="收款账户"
            :rules="[{ required: true, message: t('withdraw.test6') }]"
          />
          <van-field
            v-model="withdrawForm.accountName"
            required
            type="text"
            style="line-height: 40px"
            class="myTextArea"
            name="accountName"
            label="收款账户名"
            :rules="[{ required: true, message: t('withdraw.test6') }]"
          />
          <van-field
            v-model="withdrawForm.IFSC"
            required
            type="text"
            style="line-height: 40px"
            class="myTextArea"
            name="IFSC"
            label="IFSC"
            :rules="[{ required: true, message: t('withdraw.test6') }]"
          />
          <van-field
            v-model="withdrawForm.CPF"
            required
            type="text"
            style="line-height: 40px"
            class="myTextArea"
            name="CPF"
            label="CPF"
            :rules="[{ required: true, message: t('withdraw.test6') }]"
          />
        </van-cell-group>
        <div style="margin: 40rem 16rem 12rem 16rem">
          <van-button round block type="primary" native-type="submit">
            {{ '绑定资料' }}
          </van-button>
        </div>
      </van-form>
    </div>
  </div>
</template>

<style lang="scss" scoped>
@import url("./index.scss");
</style>
